Skip to content

ci(renovate): add markers for remaining tools (almost) - #392

Merged
cert-manager-prow[bot] merged 1 commit into
cert-manager:mainfrom
erikgb:remaining-tools-upgrades
Sep 4, 2025
Merged

ci(renovate): add markers for remaining tools (almost)#392
cert-manager-prow[bot] merged 1 commit into
cert-manager:mainfrom
erikgb:remaining-tools-upgrades

Conversation

@erikgb

@erikgb erikgb commented Sep 2, 2025

Copy link
Copy Markdown
Member

This adds missing Renovate markers for almost all versions in the tools module. I have replaced Go package digests with pseudo-versions, as I find them more human-readable and simpler to reason about. Also added some comments here and there.

I have still not found a good way of picking up the envtest releases, for example: https://github.com/kubernetes-sigs/controller-tools/releases/tag/envtest-v1.34.0. We can probably configure a custom Renovate manager for it, based on the link to the YAML file with releases documented here.

Note: I have tested this with both cert-manager and trust-manager.

@cert-manager-prow cert-manager-prow Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 2, 2025
@erikgb
erikgb force-pushed the remaining-tools-upgrades branch 2 times, most recently from 51cd5ff to 586dc70 Compare September 2, 2025 18:40
@erikgb
erikgb force-pushed the remaining-tools-upgrades branch from 586dc70 to aa3c129 Compare September 2, 2025 18:42
@erikgb erikgb changed the title WIP: ci(renovate): add markers for remaining tools (almost) ci(renovate): add markers for remaining tools (almost) Sep 2, 2025
@erikgb
erikgb requested a review from inteon September 2, 2025 19:00
@cert-manager-prow cert-manager-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 2, 2025
@erikgb

erikgb commented Sep 2, 2025

Copy link
Copy Markdown
Member Author

@inteon, I think we need your valuable input on this one! 🙏

@hjoshi123

hjoshi123 commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

I am thinking we might need data source templates for the envtest since they are packaged separately as tags/releases

@erikgb

erikgb commented Sep 2, 2025

Copy link
Copy Markdown
Member Author

@hjoshi123 Did you read the description. We could use https://raw.githubusercontent.com/kubernetes-sigs/controller-tools/master/envtest-releases.yaml as input to Renovate, I think. And maybe https://docs.renovatebot.com/modules/manager/jsonata/.

Well, not exactly. ChatGPT suggests something like this might work:

{
  "customDatasources": {
    "envtest": {
      "defaultRegistryUrl": "https://raw.githubusercontent.com/kubernetes-sigs/controller-tools/master/envtest-releases.yaml",
      "format": "yaml"
    }
  },
  "regexManagers": [
    {
      "fileMatch": ["(^|/)Makefile$"],
      "matchStrings": [
        // Example: ENVTEST_K8S_VERSION=1.30.0
        "ENVTEST_K8S_VERSION=(?<currentValue>.+)\\n"
      ],
      "datasourceTemplate": "custom.envtest",
      "depNameTemplate": "kubernetes"
    }
  ]
}

@hjoshi123

hjoshi123 commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

yup that's what I was thinking @erikgb. We use a customDataSource with the file use transformTemplates to transform and get the version and feed that to the customManagers. I could do raise a PR about what I am thinking (if you are ok with it) once this one gets merged

@erikgb

erikgb commented Sep 2, 2025

Copy link
Copy Markdown
Member Author

You are welcome to contribute this in a follow-up PR, if you can.

@ThatsMrTalbot

Copy link
Copy Markdown
Contributor

You can also try using extractVersion to get tags without a prefix for a given package, for example:

{
  "packageRules": [
    {
      "matchPackageNames": ["bar"],
      "extractVersion": "^release-(?<version>.*)$"
    }
  ]
}

Comment thread modules/tools/00_mod.mk
# https://pkg.go.dev/github.com/google/go-licenses/v2?tab=versions
tools += go-licenses=e4be799587800ffd119a1b419f13daf4989da546
# renovate: datasource=go packageName=github.com/inteon/go-licenses/v2
tools += go-licenses=v2.0.0-20250821024731-e4be79958780

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this will work, will renovate update pseudo versions?
Do you have docs/ experiment or do you just want to try and see?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure this will work. With the current configuration, the pseudo-version upgrades is configured to require dependency dashboard approval. See example here: cert-manager/cert-manager#7924.

image

@hjoshi123

Copy link
Copy Markdown
Contributor

I feel this should be okay to merge now and then I can create a follow up PR for the env test with a customDataSource

@inteon

inteon commented Sep 4, 2025

Copy link
Copy Markdown
Member

/approve
/lgtm

@cert-manager-prow cert-manager-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 4, 2025
@cert-manager-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2025
@cert-manager-prow
cert-manager-prow Bot merged commit d028efb into cert-manager:main Sep 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants